var mysql = {
    user: {
        key: [
            "select * from v_key where v3_key = ?",//校检密钥
        ],
        kefu: [
            "select * from v_kefu_user where v_form = ?",//根据机构名查询所有客服
            "select * from v_kefu_user where v_name = ?",//根据客服账号查询客服信息
        ],
        news: [
            "select v5_style as user,v5_times as time,v5_type as type,v5_content as msg,v5_kefu_name as visit,v5_user_name as uid,'' as `key` from v_news where v5_sign = ?",//根据标识查询用户历史消息（md5（用户标识+客服标识））
            "INSERT INTO v_news (v5_user_name,v5_kefu_name,v5_content,v5_type,v5_times,v5_form,v5_style,v5_sign) VALUES (?,?,?,?,?,?,?,?); ",//聊天消息记录
            "INSERT INTO v_news_log (v4_user,v4_kefu,v4_state) VALUES (?,?,?); ",//将用户加入到在线列表
            "select * from v_news_log where v4_user = ?",//根据用户识查询用户列表
            "UPDATE v_news_log SET v4_state = ? WHERE v4_user = ?;",//用户在线状态修改
            "select * from v_news_log where v4_kefu = ?",//根据客服标识查询用户列表
            "UPDATE v_news_log SET v4_state = ?;",//批量修改用户在线状态
            "UPDATE v_news_log SET v4_unread = ? where v4_user = ?;",//修改用户未读消息数
            "UPDATE v_kefu_user SET v_state = ? WHERE v_name = ?;",//客服在线状态修改
        ]
    }
}

module.exports = mysql;